package com.javakc.platform.modules.system.attachment.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.javakc.platform.components.base.entity.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
* @author zhouhonggang
* @version 1.0.0
* @project rapid-development-platform
* @datetime 2022-04-16
* @description: [系统-附加·属性]
*/
@Getter
@Setter
@TableName("system_attachment")
@ApiModel(value = "SystemAttachment对象", description = "系统-附加")
public class SystemAttachment extends Base {
    @ApiModelProperty("服务器文件名称")
    @NotBlank(message = "服务器文件名称不可为空")
    @Length(min = 2, max = 50, message = "服务器文件名称长度要求在{min}到{max}之间")
    private String name;


    @ApiModelProperty("文件后缀")
    @NotBlank(message = "文件后缀不可为空")
    @Length(min = 2, max = 50, message = "文件后缀长度要求在{min}到{max}之间")
    private String type;


    @ApiModelProperty("文件大小")
    @NotNull(message = "文件大小不可为空")
    @Range(min = 2, max = 5, message = "数字要求在{min}到{max}之间")
    private Long sizes;


    @ApiModelProperty("存储位置")
    @NotBlank(message = "存储位置不可为空")
    @Length(min = 2, max = 50, message = "存储位置长度要求在{min}到{max}之间")
    private String path;
}